package Animals;

public class Cats extends Animal {          //猫类
    private String behavior;              //猫的行为
    public Cats(){

    }
    public Cats ( String  name  ,String color,int age,String shout){
        super(name,color,age,shout);

    }
    public void Call (String behavior){
        this.behavior=behavior;

        System.out.println(this.getColor()+this.getName()+this.getShout()+"还可以"+this.getBehavior());
    }

    public String getBehavior() {
        return behavior;
    }

    public void setBehavior(String behavior) {
        this.behavior = behavior;
    }
    public  static void main(String[]args){
    Cats cat=new Cats();
    cat.setAge(2);
    cat.setName("cat");
    cat.setBehavior("捉老鼠");
    cat.setColor("花色");
    cat.setShout("喵喵");
    Cats tiger= new Cats("tiger","黄色",6,"吼");
    tiger.Message();
    cat.Message();
    tiger.Call("睡觉");
    cat.Call("捉老鼠");

    }
}
